package com.oliver.picturebackendopenfign.feignClient;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.oliver.picturebackendmodel.model.entity.SpaceUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
* @author snow
* @description 针对表【space_user(空间用户关联)】的数据库操作Service
* @createDate 2025-01-07 21:42:27
*/
@FeignClient(name = "picture-backend-spaceUser-service",path = "/api/spaceUser/inner")
public interface SpaceUserFeignClient {

    @PostMapping("/save")
    boolean save(@RequestBody SpaceUser spaceUser);

    default LambdaQueryChainWrapper<SpaceUser> lambdaQuery(){
        return new LambdaQueryChainWrapper<>(SpaceUser.class);
    }

    @GetMapping("/get/id")
    SpaceUser getById(@RequestParam("spaceUserId") Long spaceUserId);
}
